package univ.orleans.m2.inis.san.tp22102012.ex2_1;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity{
	
	private static final String TAG = MainActivity.class.getName(); 

    private Button btn_main_activity;
	private TextView text;

	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);
        
    	btn_main_activity = (Button) findViewById(R.id.btn_main_activity);
    	btn_main_activity.setOnClickListener(
    			new OnClickListener() {
    				@Override
					public void onClick(View v) {
    					Intent intent = new Intent("SECOND");
    					startActivity(intent);
					}
    			});
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    @Override
    protected void onDestroy() {
    	super.onDestroy();
    	Log.i(MainActivity.TAG,"onDestroy");
    }
    
    @Override
    protected void onStart() {
    	super.onStart();
    	Log.i(MainActivity.TAG,"onStart");
    }
    
    @Override
    protected void onStop() {
    	super.onStop();
    	Log.i(MainActivity.TAG,"onStop");
    }
    
}
